package com.sea.finance.service.impl;

import com.codecrane.core.util.CountryCurrencyEnum;
import com.codecrane.core.util.CountryMoneyTypeEnum;
import com.sea.finance.entity.ExchangeRate;
import com.sea.finance.entity.ExchangeRateRecord;
import com.sea.finance.mapper.ExchangeRateMapper;
import com.sea.finance.mapper.ExchangeRateRecordMapper;
import com.sea.finance.service.ExchangeRateRecordService;
import com.sea.finance.service.ExchangeRateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @author 陈鸿飞
 */
@Service
public class ExchangeRateRecordServiceImpl implements ExchangeRateRecordService {

    @Autowired
    private ExchangeRateRecordMapper exchangeRateRecordMapper;


    @Override
    public List<ExchangeRateRecord> findByRateId(Integer rateId) {
        return exchangeRateRecordMapper.findByRateId(rateId);
    }

    @Override
    public int save(ExchangeRateRecord rate) {
        return exchangeRateRecordMapper.insert(rate);
    }

    @Override
    public ExchangeRateRecord findByPeriod(Integer rateId, String period) {
        return exchangeRateRecordMapper.findByPeriod(rateId, period);
    }


}
